<?php
//echo "information-dtoday.pgp";
/* $today = date("Y-m-d H:i:s");
  //$infos = new WP_Query(
  //        array(
  //    'post_type' => 'information',
  //    'show' => '5',
  //    'orderby' => 'post_date',
  //    'order' => 'ASC'
  //        )
  //);
  //$infos = new WP_Query(array(
  //    'post_type' => 'information',
  //    'tax_query' => array(
  //        array(
  //            'taxonomy' => 'information',
  //            'field' => 'post_date',
  //            'operator' => '<=',
  //            'terms' => $today
  //        )
  //    )
  //        )
  //);
  $infos = new WP_Query(
  array(
  'post_type' => 'information',
  'meta_query' => array(
  array(
  'key' => 'post_date',
  'value' => $today,
  'compare' => '>=',
  //            'type' => 'datetime'
  )
  ),
  'orderby' => 'post_date',
  'order' => 'DESC'
  )
  );





  while ($infos->have_posts()) : $infos->the_post();

  $thumb_id = get_post_thumbnail_id();
  $image = wp_get_attachment_image_src($thumb_id, 'full');
  ?>


  <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>><a href="<?php the_permalink(); ?>">

  <!--<div class="date"><?php echo mysql2date('d', $post->post_date) . "<br/><span>" . mysql2date('M', $post->post_date) . "</span>"; ?>

  </div> -->
  <h1 class="entry-title"><?php the_title(); ?></h1>
  <div class="imager"><?php the_post_thumbnail('thumb-small'); ?></div>
  <h3><?php ec_posted_on(); ?></h3>
  <div class="entry-content">
  <?php the_excerpt(); ?>
  </div></a></article>
  <?php
  endwhile;
  wp_reset_postdata(); */

$infos = get_posts_count_from_today('information');
if ($infos != NULL) {
    ?>
<div class="title"><h2 class="todays_title">Today's Update</h2></div>
    <div class="information-page clearfix">
        <?php
        global $post;
        foreach ($infos as $post) {
            setup_postdata($post);
            ?> 
            <article id="post-<?php echo the_ID(); ?>" <?php post_class(); ?>><a href="<?php echo the_permalink(); ?>">
                    <h1 class="entry-title"><?php the_title(); ?></h1>
                    <div class="imager"><?php get_thumbnail('thumb-small'); ?></div>
                    <h3><?php ec_posted_on(); ?></h3>
                    <div class="entry-content">
        <?php the_excerpt(); ?>
                    </div></a>
            </article>
            <?php
        }
        wp_reset_postdata();
        ?>
    </div>
<?php
}
$infos = NULL;
?>